import { Button, Result } from "antd";
import { useNavigate } from "react-router-dom";
import icon2 from '@/assets/notfound2.png';

const NotFound = () => {
    const navigate = useNavigate();

    const toHome = () => {
        navigate('/')
    }

    return <Result
        title="404"
        subTitle="对不起，您访问的页面不存在。"
        extra={<Button type="primary" onClick={toHome}>返回首页</Button>}
        icon={<img alt='' src={icon2} />}
        className="flex flex-col items-center justify-center"
    />
}

export default NotFound